Boolean
A value of class Boolean is a logical truth value. The most common Boolean values are the results of comparisons, such as4 > 3
andWordCount = 5
. The two possible Boolean values aretrue
andfalse
.LITERAL EXPRESSIONS
true falsePROPERTY
Class
- The class identifier for the object. This property is read-only, and its value is always
boolean
.ELEMENTS
NoneOPERATORS
The operators that take Boolean values as operands are And, Or, Not,&
,=
,
and≠
.The
=
operator returnstrue
if both operands evaluate to the same Boolean value (eithertrue
orfalse
); the≠
operator returnstrue
if the operands evaluate to different Boolean values.The binary operators And and Or take Boolean expressions as operands and return Boolean values. An And operation, such as
(2 > 1) and (4 > 3)
, has the valuetrue
if both its operands aretrue
, andfalse
otherwise. An Or operation, such as(theString = "Yes") or (today = "Tuesday")
, has the valuetrue
if either of its operands istrue
.The unary Not operator changes a
true
value tofalse
or afalse
value
totrue
.COERCIONS SUPPORTED
AppleScript supports coercion of a Boolean value to a single-item list.